#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

void aaa(int x, int y)
{
    if (x < 10)
    {
        printf("%d", x);
        return;
    }
    if (y == 2)
    {
        aaa(x / 10, 0);
        printf(",%d", x % 10);
    }
    else {
        aaa(x / 10, y + 1);
        printf("%d", x % 10);
    }
}

int main() {
    int n = 0;
    scanf("%d", &n);
    aaa(n, 0);


    return 0;
}